/*!	 synfig/rendering/common/task/taskcontour.h
**	 TaskContour Header
**
**	......... ... 2015 Ivan Mahonin
**
**	This package is free software; you can redistribute it and/or
**	modify it under the terms of the GNU General Public License as
**	published by the Free Software Foundation; either version 2 of
**	the License, or (at your option) any later version.
**
**	This package is distributed in the hope that it will be useful,
**	but WITHOUT ANY WARRANTY; without even the implied warranty of
**	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
**	General Public License for more details.
**
*/

#ifndef __SYNFIG_RENDERING_TASKCONTOUR_H
#define __SYNFIG_RENDERING_TASKCONTOUR_H

#include "../../task.h"
#include "../../primitive/contour.h"
#include "tasktransformableaffine.h"

namespace synfig
{
namespace rendering
{

class TaskContour: public Task, public TaskTransformableAffine
{
public:
    typedef etl::handle<TaskContour> Handle;
    Contour::Handle contour;
    Real detail;
    bool allow_antialias;

    TaskContour(): detail(0.25), allow_antialias(true) { }
    Task::Handle clone() const
    {
        return clone_pointer(this);
    }
    virtual Rect calc_bounds() const
    {
        return !contour ? Rect::zero()
               : contour->invert ? Rect::infinite()
               : contour->calc_bounds(transformation);
    }

};

} /* end namespace rendering */
} /* end namespace synfig */

#endif